<?php
session_start();
require_once('config.php');
if(isset($_SESSION['username'])){
    if($_SESSION['user_agent']==$_SERVER['HTTP_USER_AGENT']){
        $sql_query1=@mysql_query("SELECT * FROM users WHERE username='".$_SESSION["username"]."'");
    $member1=@mysql_fetch_array($sql_query1);
    $_SESSION['username']=$member1["username"];
    $_SESSION['userid']=$member1["userid"];
     
    
    }else{
        session_destroy();require_once("template/RedirectIndex.php");
    }
    
}